package com.example.demo.mapper;

import com.example.demo.entity.OrgRegion;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by wangmu on 2018/1/29.
 */
@Mapper
public interface OrgMapper {

    /**
     * 根据部门编码获取下属部门
     * @param deptCode
     * @return
     */
    List<OrgRegion> getSubDeptByDeptCode (@Param("deptCode") String deptCode, @Param("type") Integer type);

    /**
     * 根据营业部id获取营业部人数
     * @param deptCode
     * @return
     */
    int getEmpCountInDept (@Param("deptCode") String deptCode);

    /**
     * 根据理顾工号获取理顾归属信息
     * @param code
     * @return
     */
    Map<String,Object> getEmpAscriptionByDeptCode(@Param("code") String code);

}
